•  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
분류
파일:상위 문서 아이콘.svg   상위 문서: the tree
  • apt-get 업데이트
apt-get update -y
  • sudo 설치
apt-get install sudo -y
  • apt 업데이트
sudo apt update
sudo apt upgrade -y
  • curl 설치
sudo apt install curl -y
nvm install 20
npm install pm2 -g

  • mongoDB 설치
sudo apt-get install gnupg curl -y
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
   --dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

ubuntu 24.04 (Noble)
[ 다른 버전 보기 ]
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

Ubuntu 22.04 (Jammy)

echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

Ubuntu 20.04 (Focal)


sudo apt-get update
sudo apt-get install -y mongodb-org

5[2] - 68[3]
  • systemctl 설치
sudo apt-get install systemctl -y
  • mongoDB 실행
mongosh
[ 만약 실행이 안된다면 ]
docker -> Files -> /etc/mongod.conf로 이동
아래와 같이 수정 및 모든 주석 삭제 후 저장

수정 전
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true

수정 후
storage:
dbPath: /var/lib/mongodb
  • DB 생성 및 DB에 접속할 user 만들기
use test123 //test123 DB 생성 및 접속
db.createUser({ user: "admin", pwd: "0000", roles: [ "readWrite" ]}) //admin 계정으로 0000 비밀번호로 readWrite 권한으로 계정 생성
db.getUsers(); //생성된 User 확인
exit
  • Meilisearch 설치
curl -L https://install.meilisearch.com | sh
  • git 설치
apt install git -y
  • the tree 엔진 설치
git clone https://github.com/wjdgustn/thetree --recursive


출처
[1] npm은 기본으로 설치되어 있음.[2] 5. Asia[3] 68. Seoul